<%@include file="/jsp/init.jspf" %>
<layout:top/>
<h1  class="pagetitle">Category</h1>
<div class="post">
    <hunk:isLoggedIn>
        <hunk:panel>
            <a href="${path}/jsp/app/item/item.jsp?categoryId=${itemForm.categoryId}" class="button">Add New Topic</a>
        </hunk:panel>
    </hunk:isLoggedIn>

    <display:table list="${items}" id="item" class="display_table">
        <display:column>
            <a href="${path}/item.do?action=view&id=${item.id}">${item.code}</a>
        </display:column>
        <display:column title="Action" class="action">
            <hunk:hasRole roles="admin,user">
                <%--<c:if test="${item.user.id == user.id}">--%>
                <a href="${path}/item.do?action=edit&id=${item.id}" class="icon_16 edit" title="Edit"></a>
                <input class="icon_16 delete" title="Delete" type="button" value="" onclick="loadPage($(this).parent().parent(),'${path}/item.do?action=delete&id=${item.id}');"/>
                <%--</c:if>--%>
            </hunk:hasRole>
        </display:column>    
    </display:table>
</div>

<layout:bottom/>
